package com.kyzh.core.adapters

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.gushenge.core.beans.PointDetail
import com.kyzh.core.R

class PointDetailAdapter(layout: Int, beans: ArrayList<PointDetail>, val type: Int) : BaseQuickAdapter<PointDetail, BaseViewHolder>(layout, beans) {
    override fun convert(helper: BaseViewHolder, item: PointDetail) {
        item?.let {
            helper.setText(R.id.tv1, "${it.t1}\n${it.t2}")
                    .setText(R.id.tv2, if (type == 1) it.points else it.money)
                    .setText(R.id.tv3, if (type == 1) it.type_name else it.payment)
        }
    }
}